package com.password.desktop.UI;

import java.awt.Color;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;

import javax.swing.JTextField;
import javax.swing.border.Border;

import com.password.desktop.util.SysUtil;

public class PMJTextField extends JTextField implements FocusListener {

	private static final long serialVersionUID = 1L;
	private Border focusBorder = new MotifBorders.FocusBorder(new Color(204, 204, 204), new Color(102, 175, 233));

	public PMJTextField() {
		super();
		setBorder(focusBorder);
		setFont(SysUtil.FONT_DEFAULT_MIDDLE);
		addFocusListener(this);
	}

	protected void dofocusGained(FocusEvent e) {

	}

	protected void dofocusLost(FocusEvent e) {
	}

	@Override
	public void focusGained(FocusEvent e) {
		dofocusGained(e);
		repaint();
	}

	@Override
	public void focusLost(FocusEvent e) {
		dofocusLost(e);
		repaint();
	}

}
